
package event

import (
	"syscall"
)

type Type int

type TaskType int

const (
	KLOG = Type(iota)
	KCONSOLE
	FAULT
	FIRST_NONGLOBAL
)

const (
	TASK_STATE_CHANGE = TaskType(FIRST_NONGLOBAL + iota)
)

//extern event_subscribe
func event_subscribe(event_type Type, method syscall.Arg) int

//extern event_task_subscribe
func event_task_subscribe(event_type TaskType, method syscall.Arg) int

//extern event_unmask
func event_unmask(event_type Type) int

//extern event_task_unmask
func event_task_unmask(event_type TaskType) int

func Subscribe(event_type Type, method syscall.Arg) int {
	return event_subscribe(event_type, method)
}

func TaskSubscribe(event_type TaskType, method syscall.Arg) int {
	return event_task_subscribe(event_type, method)
}

func Unmask(event_type Type) int {
	return event_unmask(event_type)
}

func TaskUnmask(event_type TaskType) int {
	return event_task_unmask(event_type)
}
